package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author liam
 * @description
 * @date 2020/3/4-22:13
 * @Version 1.0.0
 */
public interface PermissionDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);


    Set<Permission> findPermissionsByRoleId(Integer id);

    Page<Permission> selectAll(@Param("queryString") String queryString);

    Permission findById(Integer id);

    Integer selectRoleAndPermissionByPermissionId(Integer id);

    Integer selectByKeyword(String keyword);

    List<Permission> findAll();

    Integer selectExcludeByPermissionId(Permission permission);
}
